package com.lyb.spzx.user.controller;

import com.lyb.spzx.user.service.SmsService;
import com.lyb.spzx.model.vo.common.Result;
import com.lyb.spzx.model.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/user/sms")
public class SmsController {

    @Autowired
    SmsService smsService;

    @GetMapping("/sendCode/{phone}")
    public Result sendValidateCode(@PathVariable String phone){
        smsService.sendValidateCode(phone);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
